<script lang="ts" setup>
import { ask, confirm , message } from '@tauri-apps/api/dialog';

const onAsk = async () => {
  const result = await ask('你这就尴尬了？', {
    title: '善意的警告',
    type: 'warning',
  });
  console.log(result);
};
const onConfirm = async () => {
  const result = await confirm('你这就尴尬了？', {
    title: '善意的提示',
  });
  console.log(result);
};
const onMessage = async () => {
  const result = await message('你这就尴尬了？', {
    title: '善意的错误',
    type: 'error',
  });
  console.log(result);
};
</script>

<template>
  <div>
    <t-button @click="onAsk">ask</t-button>
    <t-button @click="onConfirm">confirm</t-button>
    <t-button @click="onMessage">message</t-button>
  </div>
</template>